#ifndef ENTITYACTION_H_INCLUDED
#define ENTITYACTION_H_INCLUDED

namespace Oribi
{
    /* Possible values for the actOnEntity function returning */
    #define ACTION_DO_NOTHING   0
    #define ACTION_DESTROY      1
    #define ACTION_MOVE_BACK    2
    #define ACTION_MOVE_TO_LAST 3
    class Entity;
    class Game;

    class EntityAction
    {
    public:
        EntityAction();
        EntityAction(const EntityAction&);

        /* Warning: Never delete next in the destructor */
        virtual ~EntityAction(){}

        virtual  EntityAction *clone() const = 0;
        virtual int actOnEntity(Entity&) = 0;

        void setNext(EntityAction*);
        EntityAction *getNext() const;

        friend class Entity;
    protected:
        EntityAction *next;
    };

    class EntityIdle : public EntityAction
    {
    public:
        EntityIdle(Game *g = NULL);
        EntityIdle(const EntityIdle&);

        EntityAction *clone() const;

        int actOnEntity(Entity&);
    private:
        Game *game;
    };
}

#endif // ENTITYACTION_H_INCLUDED
